home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef _LIGHT_H_
- #define _LIGHT_H_
-
- //----------------------------
- //Light
- //----------------------------
- struct LIGHT
- {
- D3DLIGHTTYPE Type; //typ svetla
-
- VECTOR3D Pos; //pozicia
- VECTOR3D Dir; //smer natocenia
-
- COLOR Diffuse; //farba
- COLOR Ambient; //farba
- COLOR Specular; //farba
-
- float Range; //dosah
- float Atten0; //linearne zoslabenie
-
- bool Active;
-
- };
-
- //------------------------------------------------------------------
- // Name: LIGHTMANAGER class
- // Desc: ******************
- //------------------------------------------------------------------
-
- class LIGHTMANAGER
- {
- private:
-
- public:
-
- //konstruktor
- LIGHTMANAGER();
-
- //destruktor
- ~LIGHTMANAGER();
-
- //zasobniky
- LIGHT *Light; //zasobnik svetil moja struktura
- D3DLIGHT9 *D3DLight; //zasobnik svetiel D3D
-
- int NumLights; //pocet svetiel
-
- //
- //FUNCKIE
- //
-
- void Initialize(int NLights);
- void CleanUp();
-
-
- void RefreshLights();
- void AddLightPoint(VECTOR3D Pos,COLOR Diffuse,
- COLOR Ambient,
- COLOR Specular,
- float Atten,float Range);
-
- void AddLightDir(VECTOR3D Dir,COLOR Diffuse,
- COLOR Ambient,
- COLOR Specular);
-
-
- };
-
-
- #endif //_LIGHT_H_